package com.springcloud.controller;

import com.springcloud.commons.result.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 *
 * ClsTradeOrder 控制层
 *
 */
@Controller
public class LoginController {


//    /**
//     * 登录页面
//     * @return
//     */
//    @RequestMapping("/login")
//    public Object login() {
//        return "login";
//    }

    /**
     * 登录错误页面
     * @return
     */
    @RequestMapping("/login_error")
    public Object loginError() {
        return "login_error";
    }

    @RequestMapping("/index")
    public Object index() {
        System.out.println(123);
        return "index";
    }

    @RequestMapping("/login")
    public Object login() {
        return "login";
    }

    @RequestMapping("/loginPage")
    public Object loginPage() {
        return "loginPage";
    }

    @RequestMapping("/logintest")
    @ResponseBody
    public Object logintest(String username,String password) {
        System.out.println(username);
        System.out.println(password);
        Result result = new Result();
        result.setMsg("成功");
        return result;
    }

}